#-------------------------------------------------------------------------------
#Here, we build the files that will be used to create the library
#-------------------------------------------------------------------------------
FILE(GLOB CLP_SRCS
     ${CBC_ROOT_DIR}/Clp/src/*.cpp
)

#-------------------------------------------------------------------------------
#And Exclude some files
#TODO: Add some logic to not exclude them if the specific constraints are
#satisfied
#-------------------------------------------------------------------------------
LIST(REMOVE_ITEM CLP_SRCS
    ${CBC_ROOT_DIR}/Clp/src/ClpMain.cpp
    ${CBC_ROOT_DIR}/Clp/src/unitTest.cpp
    ${CBC_ROOT_DIR}/Clp/src/ClpCholeskyMumps.cpp
    ${CBC_ROOT_DIR}/Clp/src/ClpCholeskyWssmp.cpp
    ${CBC_ROOT_DIR}/Clp/src/ClpCholeskyWssmpKKT.cpp
    ${CBC_ROOT_DIR}/Clp/src/ClpCholeskyUfl.cpp
)
#-------------------------------------------------------------------------------
#Here, we build the files that will be used to create the library (OsiClp)
#-------------------------------------------------------------------------------
FILE(GLOB OSICLP_SRCS
     ${CBC_ROOT_DIR}/Clp/src/OsiClp/*.cpp
)

#-------------------------------------------------------------------------------
#and build the library
#-------------------------------------------------------------------------------
ADD_LIBRARY(COIN_Clp ${CLP_SRCS})
ADD_LIBRARY(COIN_OsiClp ${OSICLP_SRCS})
INSTALL(
  TARGETS
    COIN_Clp COIN_OsiClp
  ARCHIVE DESTINATION 
    lib
)
